<template>

	<view class="components-time-line">

		<!-- 顶部自定义导航 -->
		<tn-nav-bar fixed>系统更新</tn-nav-bar>

		<!-- 页面内容 -->
		<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">

			<view class="time-line__wrap">
				<tn-time-line>
					<block v-for="(item, index) in expressData" :key="index">
						<tn-time-line-item v-if="item.status !== 0" :top="2">
							<template slot="node">
								<view class="time-line-item__node">
									<view v-if="item.status === 1" class="time-line-item__node--icon tn-icon-success"></view>
								</view>
							</template>
							<template slot="content">
								<view>
									<view class="time-line-item__content__title">{{ item.version }}</view>
									<view class="time-line-item__content__desc">{{ item.info }}</view>
									<view class="time-line-item__content__time">{{ item.time }}</view>
								</view>
							</template>
						</tn-time-line-item>
					</block>
				</tn-time-line>
			</view>

		</view>

	</view>

</template>

<script>
	export default {
		name: 'componentsTimeline',
		data() {
			return {
				expressData: [{
					info: '实现答题基础功能',
					status: 1,
					time: '2023-10-01',
					version: 'v1.0.0',
				}]
			}
		},
		methods: {

		}

	}
</script>

<style lang="scss" scoped>
	.tn-time-line-class {
		.tn-time-line-item-class {
			&:first-child {
				.tn-time-line-item__node {
					.time-line-item__node {
						background-color: $tn-main-color !important;
					}
				}
			}
		}
	}

	.time-line {

		&__wrap {
			padding: 60rpx 30rpx 30rpx 60rpx;
		}

		&-item {
			&__node {
				width: 44rpx;
				height: 44rpx;
				border-radius: 100rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-color: #AAAAAA;

				&--active {
					background-color: $tn-main-color;
				}

				&--icon {
					color: #FFFFFF;
					font-size: 24rpx;
				}
			}

			&__content {
				&__title {
					font-weight: bold;
					font-size: 32rpx;
				}

				&__desc {
					color: $tn-font-sub-color;
					font-size: 28rpx;
					margin-bottom: 6rpx;
				}

				&__time {
					color: $tn-font-holder-color;
					font-size: 26rpx;
				}
			}
		}
	}
</style>